<template>
	<view class="layout">
		<u-swiper @click="clickSwiper" @openGameLink="openGameLink" :effect3d="true" :title-style="titleStyle"
			 :descStyle="descStyle" :showGoBtn="true" mode="none" title desc :autoplay="false"
			interval="5000" duration="500" border-radius="32" height="1200rpx" v-if="options" name="original"
			text="goodsName" :list="options">
			<u-loading slot="loading"></u-loading>
		</u-swiper>
	</view>
</template>

<script>
	export default {
		title: "导航栏",
		props: ["options"],
		components: {

		},
		data() {
			return {
				titleStyle: {
					'background': 'transparent',
					'font-size': '36rpx',
					'color': '#F5F5F5'
				},
				descStyle: {
					'background': 'transparent',
					'font-size': '28rpx',
					'color': '#F5F5F5'
				},

			}
		},
		watch: {},

		mounted() {

		},
		methods: {
			clickSwiper(index) {
				let curDetail = this.options[index]
				// 进入游戏首页,根据游戏id获取首页详情
				uni.navigateTo({
					url: `/pages/game/play/index?goodsId=${curDetail.gameId}`,
				});
			},
			// 打开游戏链接
			openGameLink(item) {
				uni.navigateTo({
					url: `/pages/game/play/index?goodsId=${item.gameId}`,
				});
			},
		},
	};
</script>
<style lang="scss" scoped>

</style>